<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script type="text/javascript">
        window.onload=function(){
           
            var zhwBody=document.body;
            alert(zhwBody.nodeName);
            var fH=zhwBody.firstChild;
            alert(fH+"body的第一个子节点");
            var lH=zhwBody.lastChild;
            alert(lH+"body的最后一个子节点");
            var ht=document.getElementById("zhw");
            alert(ht.nodeName);
            var text=ht.childNodes;
            alert(text.length);
            var txt=ht.firstChild;
            alert(txt.nodeName);
            alert(txt.nodeValue);
            alert(ht.innerHTML);
            alert(ht.innerText+"Text");

        }
    </script>
</head>
<body>
    <h1 id="zhw">你是一个内容节点</h1>
</body>
</html>